const path = require('path')
const resolve = dir => {
    return path.join(__dirname, dir)
}
const urlObj = {
//	target: 'http://168.130.1.33:8097'		// 测试
//	target: 'http://168.130.6.255:8097'		// 刘泽
//	target: 'http://168.130.6.48:8097'		// 伟泽
//	target: 'http://168.130.6.46:8097'		// 月宁
	target: 'http://39.107.79.148:800'		// 线上
}

module.exports = {
	baseUrl: process.env.NODE_ENV === 'production' ? './' : './',
    lintOnSave: process.env.NODE_ENV !== 'production',
    filenameHashing: false,
    productionSourceMap: false,
    devServer: {
        port: 8866,
        host: 'localhost',
        https: false,
        open: true,
        proxy: {
        	// 通配【勿动】
		    '/hnsd': {
		        target: 'http://168.168.168.168:8888/hnsd',
		        changeOrigin: true,
		        pathRewrite: {
		            '/hnsd': '/'
		        }
		    },
		    // 联调时的跨域【可进行增加和修改】
        	'/auth': urlObj,
		    '/userCenter': urlObj,
		    '/accountServer': urlObj,
		    '/tsxstaskServer': urlObj,
		    '/fileserver': urlObj,
		    '/zsTaskServer': urlObj,
			'/xsTaskServer': urlObj,
			'/statisServer': urlObj,
		    // 通用统一验证跨域【只可改IP】
        	'/zuul': urlObj
        }
    }
}